@use "../_variables" as *;

.videojs{
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
}

.video-player-root {
  width: 525px;
  height: 275px;
  position: relative;

  &.fullscreen{
    width: 100vw;
    height: 100vh;
  }

  video {
    width: 100%;
    height: 100%;
  }
}


.controls-container{
  width: calc( 100% - 20px);
  height: 60px;
  padding: 8px 13px;
  margin: 10px auto;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  color: #fff;
  background: linear-gradient(180deg, rgba(36, 52, 63, 0.6) 0%, rgba(36, 52, 63, 0.16) 100%);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;

  &.hover-mask{
    // opacity: 0;
    transition: opacity .3s;
    background: linear-gradient(180deg, rgba(36, 52, 63, 0.16) 0%, rgba(36, 52, 63, 0.6) 100%);
  }

  &.hover{
    opacity: 1;
    transition: opacity .3s;

    [data-controls]{
      opacity: 1;
    }
    [data-play-icon]{
      opacity: 1;
    }

    .mask-cover-pause{
      opacity: 1 !important;
      transition: opacity .3s
    }
  }

  &.paused{
    [data-play-icon]{
      opacity: 1;
    }
  }

  button{
    color: var(--text-invert);
  }

  .video-player-play-button,
  .video-player-fullscreen-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;

    &:hover{
      background: var(--bg-gray-op-medium);
    }

    svg{
      width: 16px;
      height: 16px;
    }
  }

  .time-display{
    text-shadow: 0px 0px 3px rgba(109, 126, 152, 0.7);
    font-size: 13px;
    position: absolute;
    top: 9px;
    left: 40px;
    opacity: 0;
    transition: opacity .3s;
  }
}

.progress-bar-container{
  position: absolute;
  bottom: 8px;
  left: 16px;
  right: 16px;
  opacity: 0;
  transition: opacity .3s;

  .progress-bar{
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    outline: none;
    border-radius: 16px;
    cursor: pointer;
    background: linear-gradient(to right,
      var(--text-invert) 0%,
      var(--text-invert) 0%,  /*<- value */
      var(--bg-gray-op-medium, var(--stroke-gray-medium)) 0%, /*<- value */
      var(--bg-gray-op-medium, var(--stroke-gray-medium)) 100%
    );
    box-shadow: rgba(36, 52, 63, 0.3) 0px 0px 16px;

    &::-webkit-slider-thumb{
      -webkit-appearance: none;
      position: relative;
      width: 16px;
      height: 16px;
      background: var(--text-invert);
      border-radius: 50%;
      opacity: 1;
    }

    &:hover::-webkit-slider-thumb{
      opacity: 1;
    }
  }
}